home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / TreeCellEditor.java < prev    next >
Text File  |  1998-06-30  |  2KB  |  60 lines

  1. /*
  2.  * @(#)TreeCellEditor.java    1.4 97/09/23
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20.  
  21. package com.sun.java.swing.tree;
  22.  
  23. import java.awt.Component;
  24. import com.sun.java.swing.CellEditor;
  25. import com.sun.java.swing.JTree;
  26.  
  27. /**
  28.   * Adds to CellEditor the extensions necessary to configure an editor
  29.   * in a tree.
  30.   *
  31.   * @version 1.4 09/23/97
  32.   * @author Scott Violet
  33.   */
  34.  
  35. public interface TreeCellEditor extends CellEditor
  36. {
  37.     /**
  38.      * Sets an initial <I>value</I> for the editor.  This will cause
  39.      * the editor to stopEditing and lose any partially edited value
  40.      * if the editor is editing when this method is called. <p>
  41.      *
  42.      * Returns the component that should be added to the client's
  43.      * Component hierarchy.  Once installed in the client's hierarchy
  44.      * this component will then be able to draw and receive user input.
  45.      *
  46.      * @param    table        the JTree that is asking the editor to edit
  47.      *                This parameter can be null.
  48.      * @param    value        the value of the cell to be edited.
  49.      * @param    isSelected    true is the cell is to be renderer with
  50.      *                selection highlighting
  51.      * @param    expanded    true if the node is expanded
  52.      * @param    leaf        true if the node is a leaf node
  53.      * @param    row        the row index of the node being edited
  54.      * @return    the component for editing
  55.      */
  56.     Component getTreeCellEditorComponent(JTree tree, Object value,
  57.                      boolean isSelected, boolean expanded,
  58.                      boolean leaf, int row);
  59. }
  60.